package com.ly.heart.service.impl;

import java.util.List;

import com.ly.common.utils.DateUtils;
import com.ly.heart.mapper.ProjectAppointManagerMapper;
import org.springframework.stereotype.Service;
import com.ly.heart.domain.ProjectAppointManagerEntity;
import com.ly.heart.service.IProjectAppointManagerEntityService;

import javax.annotation.Resource;

/**
 * 委任项目经理记录Service业务层处理
 *
 * @author cxl
 * @date 2024-05-14
 */
@Service
public class ProjectAppointManagerEntityServiceImpl implements IProjectAppointManagerEntityService {

    @Resource
    private ProjectAppointManagerMapper projectAppointManagerMapper;

    /**
     * 查询委任项目经理记录
     *
     * @param id 委任项目经理记录主键
     * @return 委任项目经理记录
     */
    @Override
    public ProjectAppointManagerEntity selectProjectAppointManagerEntityById ( String id ) {
        return projectAppointManagerMapper.selectProjectAppointManagerEntityById ( id );
    }

    /**
     * 查询委任项目经理记录列表
     *
     * @param projectAppointManagerEntity 委任项目经理记录
     * @return 委任项目经理记录
     */
    @Override
    public List<ProjectAppointManagerEntity> selectProjectAppointManagerEntityList ( ProjectAppointManagerEntity projectAppointManagerEntity ) {
        return projectAppointManagerMapper.selectProjectAppointManagerEntityList ( projectAppointManagerEntity );
    }

    /**
     * 新增委任项目经理记录
     *
     * @param projectAppointManagerEntity 委任项目经理记录
     * @return 结果
     */
    @Override
    public int insertProjectAppointManagerEntity ( ProjectAppointManagerEntity projectAppointManagerEntity ) {
        projectAppointManagerEntity.setCreateTime ( DateUtils.getNowDate () );
        return projectAppointManagerMapper.insertProjectAppointManagerEntity ( projectAppointManagerEntity );
    }

    /**
     * 修改委任项目经理记录
     *
     * @param projectAppointManagerEntity 委任项目经理记录
     * @return 结果
     */
    @Override
    public int updateProjectAppointManagerEntity ( ProjectAppointManagerEntity projectAppointManagerEntity ) {
        return projectAppointManagerMapper.updateProjectAppointManagerEntity ( projectAppointManagerEntity );
    }

    /**
     * 批量删除委任项目经理记录
     *
     * @param ids 需要删除的委任项目经理记录主键
     * @return 结果
     */
    @Override
    public int deleteProjectAppointManagerEntityByIds ( String[] ids ) {
        return projectAppointManagerMapper.deleteProjectAppointManagerEntityByIds ( ids );
    }

    /**
     * 删除委任项目经理记录信息
     *
     * @param id 委任项目经理记录主键
     * @return 结果
     */
    @Override
    public int deleteProjectAppointManagerEntityById ( String id ) {
        return projectAppointManagerMapper.deleteProjectAppointManagerEntityById ( id );
    }
}
